/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
function print(id,item){
    var html="<html>";
    html+= document.getElementById(id).innerHTML;
    html+="<br/>";
    html+= document.getElementById(item).innerHTML;
    html+="</html>";

    var printWin = window.open('','','left=0,top=0,width=1,height=1,toolbar=0,scrollbars=0,status  =0');
    printWin.document.write(html);
    printWin.document.close();
    printWin.focus();
    printWin.print();
    printWin.close();
}

function SelectAllCheckboxesSpecific(spanChk){
    var IsChecked = spanChk.checked;
    var Chk = spanChk;
    Parent = document.getElementById('form:mytable');
    var items = Parent.getElementsByTagName('input');
    for (i = 0; i < items.length; i++){
        if (items[i].id != Chk && items[i].type == "checkbox"){
            if (items[i].checked != IsChecked){
                items[i].click();
            }
        }
    }
}

//function getSelected(){
//    alert("Inside Function!");
//    var selected = document.getElementsByName('myform2:add_item2:itemStatus');
//    alert("Selected Length: "+selected.length);
//    for(var i=0; i<selected.length; i++){
//        if (selected[i].checked) {
//        alert(selected[i].value);
//      }else{
//          alert("Not Checked !");
//      }
//    }
//    
//}


